import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from 'vuex-persistedstate'
import merchant from './modules/merchant'
import settlement from './modules/settlement'
import user from './modules/user'
import flow from './modules/flow'
import common from './modules/common'
import { getters } from './getters'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {},
  mutations: {},
  actions: {},
  modules: {
    merchant,
    settlement,
    common,
    user,
    flow
  },
  getters,
  plugins: [createPersistedState({ storage: window.sessionStorage })],
})
